const app = getApp()
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        title: {
            type: String,
            value: ""
        },
        search: {
            type: String
        },
        share: {
            type: Boolean,
            value: true
        },
        back: {
            type: Boolean,
            value: true
        },
        home: {
            type: Boolean,
            value: true
        },
    },

    /**
     * 组件的初始数据
     */
    data: {
        navHeght: app.navHeght,
        statusBarHeight: app.statusBarHeight
    },

    /**
     * 组件的方法列表
     */
    methods: {
        backTop(e) {
            if (getCurrentPages().length) {
                wx.reLaunch({
                    url: '/pages/index/index',
                })
            } else {
                wx.navigateBack({
                    delta: 1
                })
            }
        },
        backHome(e) {
            wx.reLaunch({
                url: '/pages/index/index',
            })
        }
    }
})